<%@page isELIgnored="false" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %>
<%@taglib prefix="spring" uri="http://www.springframework.org/tags" %>
<%@taglib prefix="form" uri="http://www.springframework.org/tags/form" %>

<c:set var="fieldRequired"><spring:message code="validation.field.required"/></c:set>
<c:set var="emailInvalid"><spring:message code="validation.email.invalid"/></c:set>

<script type="text/javascript">

	$().ready(function() {
		$("#login").validate({
			rules: {
				email: {
					required: true,
					email: true
				},
				password: {
					required: true
				}
			},
			messages: {
				email: {
					required: "${fieldRequired}",
					email: "${emailInvalid}"
				},
				password: {
					required: "${fieldRequired}"
				}
			}
		});
	});
	
</script>

<div style="padding:10px">
	<div id="form">
		<span class="title"><spring:message code="login.form.title"/></span>
		<c:if test="${not empty error}">
			<br/><div class="error" style="font-size:13px; width:280px; padding: 5px"><spring:message code="login.failed.message"/></div>
		</c:if>
		<form method="post" id="login" name="login" action="login/submit.do">
			<table class="tableForm">
				<tr>
					<td><label><spring:message code="form.email"/></label></td>
					<td><input id="email" name="email" size="23"/></td>
				</tr>
				<tr>
					<td><label><spring:message code="form.password"/></label></td>
					<td><input type="password" name="password" id="password" size="23"/></td>
				</tr>
				<tr><td colspan="2" style="padding-left: 170px;"><input name="submit" type="submit" value="<spring:message code='login.button'/>"/></td></tr>
				<tr><td colspan="2"><div id="line" style="width: 225px"></div></td></tr>			
				<tr><td colspan="2"><span class="footnote" style="color:black !important"><spring:message code="forgot.password"/>? <a class="plainLink" style="color:black !important" href="#"><spring:message code="recover.here"/>.</a></span></td></tr>				
			</table>
			
		</form>
	</div>
	
</div>